Split ucode setup into per-section commands + apply diff + wizard UX - #341
Merged
Conversation
…zard UX Split the monolithic `ucode setup` into `ucode setup` (agents + models) plus `ucode setup mcp` / `skills` / `budget-policy` / `help`, each editing one section of the same managed config. `ucode setup` now carries the other sections forward on a re-run instead of clearing them. `ucode apply` shows a human-readable ADD/DELETE/CHANGE diff against the published config before confirming, and does nothing when they already match. Wizard UX: step banners, per-agent progress and a uniform per-agent confirmation, a "Selected so far" recap, a Claude family-slot recap, a boxed "What is a budget policy?" explanation, spend-range budget tiers with an anchored default, and a boxed warning when no attachable budget exists. Codex model lists now sort newest-first. Gemini is dropped from the setup picker (still launchable). Co-authored-by: Isaac
Make clear the MCP / skills / budget-policy commands aren't required to publish, so a config with none configured doesn't read as unfinished. Co-authored-by: Isaac
AarushiShah-db
left a comment
Collaborator
There was a problem hiding this comment.
setup_mcp_err.mov
See repro of one error found during ucode setup mcp - when I try to add new mcp's it doesn't seem to take affect?
Summary from claude on the error
"setup_mcp_command gates the manifest update on whether the local-state MCP
snapshot changed around the picker (before == after) instead of on whether it
differs from what the manifest already holds. So if an admin already has the
desired MCP server registered locally and just confirms it in the picker
without toggling anything, before == after, the command reports "No changes,"
and the server never gets written to manifest["mcp_servers"] — publishing a
managed config with no MCP servers."
lilly-luo
reviewed
Aug 18, 2026
lilly-luo
reviewed
Aug 18, 2026
lilly-luo
reviewed
Aug 18, 2026
lilly-luo
reviewed
Aug 18, 2026
lilly-luo
reviewed
Aug 18, 2026
Collaborator
lilly-luo
reviewed
Aug 18, 2026
lilly-luo
reviewed
Aug 18, 2026
Address PR review feedback: - Rename `ucode setup budget-policy` -> `ucode setup spend-tiers` and the user-facing labels to "Tiered Spend Policy" (Ali/lilly feedback); the `budget_policy` manifest key is unchanged. - Rename `ucode setup mcp` -> `ucode setup mcps` for plural consistency with `skills`. - Clarify the tier-percentage prompt with an "Ex: 50%" hint so admins don't enter 0.5 to mean 50%. - Offer to publish at the end of each setup section (`_offer_apply`) so an admin can apply incrementally instead of re-running the whole flow. - Fix `setup mcps` dropping servers that were already registered via `ucode configure mcp`: the no-op check compared post-picker local state to pre-picker local state, so carried-forward servers looked unchanged and were never written to the manifest. Now also sync when local state holds servers the manifest is missing, guarded so an Esc on empty state can't wipe a published section. Co-authored-by: Isaac
Collaborator
|
to test:
|
lilly-luo
approved these changes
Aug 18, 2026
lilly-luo
enabled auto-merge (squash)
August 18, 2026 17:55
Collaborator
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Breaks the monolithic
ucode setupinto focused commands and polishes the interactive wizard.Command surface
ucode setupnow configures agents and models only, then prints a checklist of what's left. Each other section is its own command:ucode setupucode setup mcpucode setup skills [--location a.b,c.d]ucode setup budget-policyucode setup helpucode setupcarries the other sections forward instead of clearing them (a re-run afterucode revert/fresh machine falls back to the workspace's published config). A carried budget policy that no longer fits the enabled agents is dropped with a warning rather than blocking the save.ucode setupto have run first; they validate structurally (no model-inventory re-check, since they don't touch models).ucode applydiffBefore the confirmation prompt,
applyshows a human-readable ADD / DELETE / CHANGE diff against the published config (normalized the same way it will be sent, so no phantom changes), and does nothing when the two already match.Wizard UX
step 2 of 3 · Models & settings), per-agent progress counters, and a uniform✔ <agent> configured — <model> · <scope>line per agent.under 50%,50–90%,90%+) anchored by the manifest default; a duplicate agent/model re-asks only the agent/model, keeping the percentage.ucode gemini).Testing
uv run pytest(non-e2e): 1856 pass. The one failure,test_mcp.py::TestConfigureMcpCommand::test_registers_discovered_external_server, is pre-existing onmain(verified on a clean checkout) and unrelated to this change.uv run ruff check .clean.This pull request and its description were written by Isaac.